layui.define(['form', 'laydate', 'table', 'sellerApi'], function (exports) {
    var form = layui.form;
    var sellerApi = layui.sellerApi;
    var index = layui.index;
    var view = {
        init: function () {
            Lib.initGenrealForm($("#updateForm"), form);
            this.initSubmit();
        },
        initSubmit: function () {
            $("#updateButton").click(function () {
                form.on('submit(form)', function () {
                    sellerApi.updateSeller($('#updateForm'), function () {
                        parent.window.dataReload();
                        Common.info("更新成功");
                        Lib.closeFrame();
                    });
                });
            });
            $("#updateButton-cancel").click(function () {
                Lib.closeFrame();
            });
        }

    }
    exports('edit', view);

});